package com.travel.common.utils;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Random;
import java.util.UUID;

/**
 * @classDesc: 功能描述:()
 * @author:<a href="leeue@foxmail.com">李月</a>
 * @Version:v1.0
 * @createTime:2019年3月19日 下午3:16:58
 */
public class OrderNoUtils {

	public static SimpleDateFormat sdf = new SimpleDateFormat("yyyymmddhhmmss");
	private static Date date = new Date();

	public static String getOrderNo(Long userId) {

		// 随机6位随机
		Random random = new Random();
		int nextInt = random.nextInt(100000);
		String dateStr = nextInt + sdf.format(date) + userId;

		return dateStr;
	}
}
